package com.util
{
	import flash.display.Bitmap;
	import flash.utils.ByteArray;
	public class MapUtil
	{

     
        [Embed(source="assets/map/map001/map001.tmx", mimeType="application/octet-stream")]
        private static const Map_001:Class;
        [Embed(source="assets/map/map002/map002.tmx", mimeType="application/octet-stream")]
        private static const Map_002:Class;
        [Embed(source="assets/map/map003/map003.tmx", mimeType="application/octet-stream")]
        private static const Map_003:Class;
       // [Embed(source="assets/map/map002.tmx", mimeType="application/octet-stream")]
      //  public static const Map_002:Class;
		public static function getMapXml(id:int):XML{
		 
			var ba:ByteArray;
			switch(id){
				case 0: ba = new Map_001() as ByteArray;break;
				case 1: ba = new Map_002() as ByteArray;break;
				case 2: ba = new Map_003() as ByteArray;break;
				default:ba = new Map_001() as ByteArray;break;
			}
            var xml:XML = new XML( ba.readUTFBytes( ba.length ) );
            return xml;
			 
		}
		
		
		
		//car part
//        [Embed(source='assets/map/tilekit.jpg')]
//        private static const TileKit:Class;
// 
//		public static function getTileKit(id:int):Bitmap{
// 
//	            return new TileKit as Bitmap;
//        
//		}
//		
		//item part
 
		
 
	}
}